// 引入 express    npm install express
let express = require('express');
let router = express.Router();
let query = require('./Database');
// 引入 fs
let fs = require('fs');
// 引入 body-parser     npm install body-parser
let bodyParser = require("body-parser");
// 引模块:npm install mysql
const mysql = require('mysql');
//
var path = require('path');
/* GET home page. */
router.get('/', function(req, res, next) {
    res.render('SuccessfulSubmission', {});
});
router.post('/Pay',async function (req, res) {
    console.log('++++++++++++++++++++++');
    console.log(req.body);
    let address = await query('select * from address where id ='+req.body.id+'');
    console.log(address);
    res.send({code:100,address:address});
});
module.exports = router;